package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.DevStatusRecordDao;
import com.sugon.entity.DevStatusRecordEntity;
import com.sugon.service.DevStatusRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * ${comments}Service实现类
 *
 * @author YuXD
 * @date 2020-05-28 11:34:39
 */
@Service("devStatusRecordService")
public class DevStatusRecordServiceImpl implements DevStatusRecordService {
    @Autowired
    private DevStatusRecordDao devStatusRecordDao;

    @Override
    public DevStatusRecordEntity queryObject(String id) {
        return devStatusRecordDao.queryObject(id);
    }

    @Override
    public List<DevStatusRecordEntity> queryList(Map<String, Object> map) {
        return devStatusRecordDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return devStatusRecordDao.queryTotal(map);
    }

    @Override
    public int save(DevStatusRecordEntity devStatusRecord) {
        devStatusRecord.setId(RandomUtil.randomString(32));
        return devStatusRecordDao.save(devStatusRecord);
    }

    @Override
    public int update(DevStatusRecordEntity devStatusRecord) {
        return devStatusRecordDao.update(devStatusRecord);
    }

    @Override
    public int delete(String id) {
        return devStatusRecordDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return devStatusRecordDao.deleteBatch(ids);
    }
}
